<%@page import="helpers.UrlHelper"%>
<%@page import="entities.OwnerDomain"%>
<%@page import="java.util.TreeMap"%>
<% 
String type = (String) request.getAttribute("type");
TreeMap check = (TreeMap) request.getAttribute("check");
String success = (String) request.getAttribute("success");
OwnerDomain ownerDomain = (OwnerDomain) request.getAttribute("ownerDomain");
%>

<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<jsp:include page="/layouts/header.jsp" />
	
                <div id="leftSideContent">
                	<div class="profilePage clearafter">
                        <div class="left dashboard">
                            <jsp:include page="/elements/menu_profile.jsp" />
                        </div>
                        <div class="right profileContent">
                        	<% if (check.size() > 0) { %>
                        	<div class="message-error">
		                    	<span class="closeMessage"></span>
		                    	<ul>
		                    		<% if (check.get("title") != null)  { %>
									<li> - <%=check.get("title")%></li>
									<% } %>
									<% if (check.get("description") != null)  { %>
									<li> - <%=check.get("description")%></li>
									<% } %>
									<% if (check.get("status") != null)  { %>
									<li> - <%=check.get("status")%></li>
									<% } %>
		                    	</ul>
		                    </div>
		                    <% } %>
		                    <% if (success != null) { %>
		                    <div class="message-success">
		                    	<span class="closeMessage"></span>
		                    	<p><%=success %></p>
		                    </div>
		                    <% } %>
		                    
                        	<section class="block">
								<div class="blockContent changeStatus">
									<h3 class="title">Change Owner Site</h3>
									<form method="post" action="">
										<% if (type.equalsIgnoreCase("title")) { %>
										<label>
										    <span>Title</span>
										    
										    <input type="text" name="title" value="<%=ownerDomain.getTitle() != null? ownerDomain.getTitle() : "" %>" />
										</label>
										<% } %>
										
										<% if (type.equalsIgnoreCase("description")) { %>
										<label>
										    <span>Description</span>
										    
										    <textarea rows="3" cols="58" name="description"><%=ownerDomain.getDescription() != null ? ownerDomain.getDescription() : "" %></textarea>
										</label>
										<% } %>
										
										<% if (type.equalsIgnoreCase("status")) { %>
										<label>
										    <span>Status</span>
										    
										    <h3 style="color: green;"><input type="radio" value="1" name="active" <%=ownerDomain.getActive() == 1 ? "checked=\"checked\"" : "" %> > Active</h3>
											<div style="margin-bottom: 10px;" class="pro_value">The page <%=ownerDomain.getDomain() %> is active and visible at the URL. SEO data  gathering and backlinks stats updated regularly. </div>
											<h3><input type="radio" value="0" name="active" <%=ownerDomain.getActive() == 0 ? "checked=\"checked\"" : "" %>> Hidden</h3>
											<div style="margin-bottom: 10px;" class="pro_value">
												  The page Websiteus.org is visible only for you when you are logged 
												in. All the rest catch an Error 404 at the <a href="/info/<%=ownerDomain.getDomain()%>"><%=UrlHelper.getServerUrl(request) %>/info/<%=ownerDomain.getDomain() %>/</a>. As robots receive an Error 
												404 the links from this page are not visible and you do not receive link 
												weight to your pages. But, SEO data gathering and backlinks stats updated 
												regularly.
											</div>
										</label>
										<% } %>
                                        <br />
									    <div class="content-center">
									    	<button type="submit" class="buttonStyle">Update</button>
									    </div>
									</form>
								</div>
								<div class="blockShadow"></div>
							</section>
                        </div>
                    </div>
                </div>
                
                <!-- right content -->
                <jsp:include page="/elements/right.jsp" />
                <!-- end right content -->
                
<jsp:include page="/layouts/footer.jsp" />